package com.yunhe.springbootdemo3.service.impl;

import com.yunhe.springbootdemo3.dao.AccountDao;
import com.yunhe.springbootdemo3.domain.Account;
import com.yunhe.springbootdemo3.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class AccountServiceImpl implements AccountService{

    @Autowired
    private AccountDao accountDao;

    /**
     * 根据id查询用户
     * @param id
     * @return
     */
    @Override
    public boolean findAccountById(int id) {

        String username = accountDao.findAccountById(id);

        if(username != null){

            return false;
        }else {
            return true;
        }
    }
}
